package cn.ivicar.app.config;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import cn.com.carsmart.util.configmanagement.ConfigUtil;

public class Configuration {

	private static transient final Logger LOGGER = LoggerFactory.getLogger(Configuration.class);

	private static Properties properties;

	static {
		properties = new Properties();
		String props = "config.properties";
		try {
			InputStream stream = ConfigUtil.getConfigReader().getResourceAsStream(props);
			properties.load(stream);
		} catch (IOException e) {
			LOGGER.trace(e.getMessage());
		}
	}

	public static String getProperty(String key) {
		return properties.getProperty(key);
	}
}
